package com.jn.hilt.manager;

import com.jn.hilt.entity.User;
import javax.inject.Singleton;
import dagger.hilt.android.scopes.ActivityScoped;
import jakarta.inject.Inject;

@Singleton
public class UserManager {
    // 构造方法注入：Hilt 会自动提供所需参数
    @Inject
    public UserManager() {
    }

    // 业务方法：创建用户
    public User createUser(String id, String name, int phone, String address) {
        return new User(id, name, phone, address);
    }

    // 业务方法：格式化用户信息
    public String formatUserInfo(User user) {
        return user.toString();
    }
}